﻿using System;
using System.Web;
using YunCMS.BLL;
using YunCMS.Model;


public class FeedbackHandler : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {

        YCModuleFeedbackBLL bll = new YCModuleFeedbackBLL();
        YCModuleFeedback model = new YCModuleFeedback();

        model.Title = context.Request["title"].ToString().Trim();
        model.Content = context.Request["content"].ToString().Trim();
        model.IsRead = false;
        try
        {
            if (bll.Add(model) > 0)
            {
                context.Response.Write("success");
            }
        }
        catch (Exception e)
        {
            context.Response.Write(e.Message);
        }
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}